package com.qf.mrboot.service.impl;

import com.qf.mrboot.dao.SubjectDao;
import com.qf.mrboot.entity.Subject;
import com.qf.mrboot.service.SubjectService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * (Subject)表服务实现类
 *
 * @author makejava
 * @since 2021-06-16 11:12:13
 */
@Service("subjectService")
public class SubjectServiceImpl implements SubjectService {
    @Resource
    private SubjectDao subjectDao;

    /**
     * 通过ID查询单条数据
     *
     * @param suId 主键
     * @return 实例对象
     */
    @Override
    public Subject queryById(Integer suId) {
        return this.subjectDao.queryById(suId);
    }

    /**
     * 通过title查询数据
     * @param title 标题
     * @return list
     */
    @Override
    public List<Subject> queryByTitle(String title) {
        return subjectDao.queryByTitle(title);
    }
}
